<!--
 * @Author: ranjianglai
 * @Date: 2023-01-12 15:49:45
 * @Description: 申请开团/入团
-->


<template>
    <view class="type-area cus-apge">
        <!-- 收货地址 -->
        <view v-if="type==1" class="com-m-t-20 location">
            <view v-if="!hasLocation" class="com-flex com-row-between" @tap="addEditAddress()">
                <text class="com-font-bold">发货地</text>
                <view class="com-flex">
                    <text class="com-m-r-30 com-assist-color">请选择发货地</text>
                    <u-icon name="arrow-right" size="28rpx"></u-icon>
                </view>
            </view>
            <view v-else>
                <view class="com-flex">
                    <u-tag text="默认" type="error" size="mini"></u-tag>
                    <text class="com-m-l-16">四川省成都市都江堰市</text>
                </view>
                <view class="com-m-t-24 com-flex" @tap="addEditAddress(1)">
                    <text class="com-m-r-12 com-font-36 com-font-bold">奎光塔街道学府路366号阿坝州工商都江堰干休所</text>
                    <u-icon name="arrow-right" color="#666" size="28rpx" top="2rpx"></u-icon>
                </view>
                <view class="com-m-t-24 com-flex">
                    <text class="com-m-r-24">李鸥</text>
                    <text>18100011234</text>
                </view>
            </view>
        </view>

        <!-- 列表 -->
        <view class="com-m-t-20" v-for="(item,index) in list" :key="index">
            <ct-business-list :cardData="item" @clickButton="clickButton" />
        </view>
        <!-- 间距 -->
        <u-gap height="30rpx" bgColor="transparent"></u-gap>
        <!-- 底部结算组件 -->
        <ct-button-settlement :bottomData="bottomData" />
    </view>
</template>


<script>
export default {
    name: '',
    components: {},
    props: {},

    data() {
        return {
            type: 1, // 1申请开团,2申请入团
            hasLocation: false, 
            list: [
                { 
                    checked: [],
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '新品',
                            price: 1660,
                            num: 1
                        }
                    ]
                },
                {
                    checked: [],
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '新品',
                            price: 160,
                            num: 1
                        }
                    ]
                },
            ],
            // 底部
            bottomData: {
                checked: [],
                price: 1660,
                rmb: 53,
                button: {
                    text: "确认开团",
                    width: 190
                },
                tips: "拼团商品不支持更换"
            }
        };
    },

    computed: {},
    watch: {},

    onLoad(option) {
        // 上一页面携带参数控制是申请开团还是申请入团
    },

    mounted() { },

    methods: {},

    created() { },
    beforeCreate() { },
    beforeMount() { },
    beforeUpdate() { },
    updated() { },
    beforeDestroy() { },
    destroyed() { },
    activated() { },
}
</script>


<style lang="scss" scoped>
    .location{
        background: #fff;
        padding: 32rpx;
        border-radius: 24rpx;
    }
</style>